import torch
import cv2
import numpy as np

from PIL import Image, ImageDraw, ImageFont


if __name__ == "__main__":
    img = 'img/street.jpg'
    try:
        image = Image.open(img)
    except:
        print('Open Error! Try again!')
    
    #image = image.convert("RGB")
    image_shape = np.array(np.shape(image)[0:2])    ##获取图片shape
    print(np.shape(image))
    # image.show()
    # cv2.imshow(image)
    # cv2.waitKey(1)